Ext.define('DCApp.view.attach.List', {
extend: 'DCApp.view.PageList',
alias: 'widget.Attachlist',

viewModel: {
	type: 'Attachlist'
},
tbar: ['->',{
	xtype:'fileupload',
	multiple:true,
	entity_to:'Attach'
}],
columns: [
{text:'id',dataIndex:'id', filter: 'number'},
{text:'所属条目id',dataIndex:'eid', filter: 'number'},
{text:'排序',dataIndex:'ord', filter: 'number'},
{text:'所属条目类名',dataIndex:'ename',filter:'string'},
{text:'附件名',dataIndex:'fname',filter:'string'},
{text:'文件大小',dataIndex:'fsize', filter: 'number'},
{text:'保存路径',dataIndex:'path',filter:'string',
    width:320,
    renderer:function(v,r,rec, rowIndex, columnIndex, store){
    	var aid =rec.get('id');
    	var href = "/fopen?fp=" + v;
     	return "<a target='_blank' href='" + href + "'>"+v+"</a>";
    }
},
{text:'用途',dataIndex:'purpose',filter:'string'},
{text:'后缀',dataIndex:'suffix',filter:'string'},
{text:'题名',dataIndex:'title',filter:'string'},
{text:'操作人id',dataIndex:'uid', filter: 'number'} ]
});
